<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>贪吃蛇</title>
	<script type="text/javascript" src="snake.js"></script>
	<script>
	</script>
</head>
<body>
	<style>
body{
	text-align: center;
}
#snake{
	margin-top: 100px;
}
	</style>
	<canvas id="snake" width="" height=""></canvas>

	<h4 id="score">得分：0</h4>
	<h4 id="speed">速度：8</h4>
	<div id="begin" style="color:green;cursor: pointer">开始游戏</div>
	<script>
	var snake = new Snake("snake","score","speed",15,15);
	document.getElementById('begin').onclick = function () {
		snake.init();
	}
	</script>
</body>
